$(function(){
	//客服单个详情
	var id =  GetQueryString("id");
	MuiAjaxFn("client/salesman/select?page=1&pagesize=1", {"id":id}, function(data){
		var str = '';
		if(data.pageInfo.size != 0){
			//	渲染客服
			
			
				var obj = data.pageInfo.list[0];
				
				if(obj.headPhoto.indexOf("http://") == -1 ){
		        	//判断当前的头像是否是有htto前缀.
			        obj.headPhoto = IMGUrl + '' + obj.headPhoto ;
			    }
				if(obj.introduce == ''){
					obj.introduce = '暂无简介'
				}
//				console.log(data)
				str += 	'<div class="personbox-center"> '+
						'	<div class="headimg"  style="background-image:url('+obj.headPhoto+')"></div>'+
						'	<p class="name">'+obj.salesmanName+'</p>'+
						'	<p class="address">'+obj.region+'</p>'+
						'</div>'+
						'<div class="graycont">'+
						'	<p class="p2em">'+obj.introduce+'</div>'+
						'<div class="btn40 salsemanbtn" data-id="'+obj.id+'" >点击咨询</div> ';
			
			
			$(".BRDet").html(str);
			$(".btn40" ).on("tap",function(){
				window.location.href= "HelpCenter.html?source=customer&id="+$(this).attr("data-id");
			})
		}else{
			//客服为空
			nodata("客服正在赶来路上!", ".BRDet",0);
		}
	})
	
	
})
